<!--
 * @Author: Nico
-->
<template>
  <van-cell-group v-if="formId" class="pr-1 flex flex-wrap" inset>
    <!--  :style="{ width: `${info.extension.width.value}%` }" -->
    <!--    -->
    <slot></slot>
    <!-- <div :style="{ width: `${info.extension.width.value}%` }"></div> -->
  </van-cell-group>

  <div v-else class="mt-[2px]">
    <div class="ui-input flex flex-wrap">
      <slot></slot>
    </div>
  </div>
</template>
<script>
  import { defineComponent } from 'vue'
  import { Field, CellGroup } from 'vant'
  export default defineComponent({
    name: 'UiPdaFormItem',
    components: {
      [CellGroup.name]: CellGroup,
      [Field.name]: Field,
    },
    mixins: [],
    inject: {
      formId: { default: '' },
    },
    props: {
      info: {
        required: true,
        type: Object,
        default: function () {
          return {}
        },
      },
    },
    computed: {},
    created() {},
  })
</script>

<style lang="scss">
  // 去掉表单空间按编剧
  .van-cell-group {
    margin: 0px !important;
  }
</style>
